import * as userTaskApi from '@/api/UserTaskApi'
import type { RedirectInfo } from '@/types/workflow';
/**
 * 获取流转信息
 */
export const getRedirectInfo = async (formId:number) :Promise<RedirectInfo>=>{
    const logList = await userTaskApi.getTaskLog(formId);
    if(!logList.log){
        logList.log = [];
    }
    if(!logList.summary){
        logList.summary = "";
    }

    return {
        summary:logList.summary,
        logList:logList.log
    }
}